package com.hmall.cart.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 远程调用配置类
 *
 * @Author mr.Candy
 * @Date 2025/6/1720:07
 */
@Configuration
public class RemoteCallConfig {
    /**
     * 创建RestTemplate实例
     * @return
     */
    @Bean
    @LoadBalanced // 开启客户端负载均衡调用技术
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
